package com.sid.oncf.services.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import com.sid.oncf.dao.interfaces.IRoleDao;
import com.sid.oncf.entity.Roles;
import com.sid.oncf.services.interfaces.IRoleService;

@Transactional
public class RoleServiceImpl implements IRoleService {

	@Autowired
	private IRoleDao iRoleDao;
	
	public boolean saveRole(Roles r) {
		// TODO Auto-generated method stub
		return iRoleDao.save(r);
	}

	public boolean deleteRole(int id) {
		// TODO Auto-generated method stub
		return iRoleDao.delete(id);
	}

	public Roles findRole(int id) {
		// TODO Auto-generated method stub
		return iRoleDao.find(id);
	}

	public List<Roles> findAllRoles() {
		// TODO Auto-generated method stub
		return iRoleDao.findAll();
	}

}
